package com.cqy.resource1.web;

import com.cqy.api.SayHello;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("r1")
public class R1Controller {

    @Autowired
    SayHello sayHello;

    @GetMapping("{text}")
    public Object sayHello(@PathVariable("text") String text) {
        log.error("===== coming in ======");
        return sayHello.hello(text);
    }

}
